<?php
class p_episode_video extends Model{
	public static function getTableName(){
		return 'p_episode-video';
	}

	public static function getEpisodeID($video_id)
	{
	    $sql = "select episode_id from `".self::getTableName()."` where video_id='{$video_id}' order by episode_id desc";
		$ret = Model::$dbo['r']->findBySql(__class__, $sql);
		return isset($ret[0]) ? $ret[0]->episode_id :  false;
	}
}
?>
